package com.harry.resource.workflow.properties;

import java.util.Map;

import com.harry.basis.PropertySettings;
import com.harry.resource.workflow.entity.WorkFlowDefinition;
import com.harry.utility.InnerUtils;

public class Ps4WorkFlowDefinition extends PropertySettings<WorkFlowDefinition> {

	@Override
	public String[] nameProperties() {
		return new String[] { "name" };
	}

	@Override
	public String[] keyProperties() {
		return new String[] { "name" };
	}

	@Override
	public String[] listProperties() {
		return new String[] { "name", "builder.username", "createTime" };
	}

	@Override
	public String[] editProperties() {
		return new String[] { "name", "initialStateDefinition", "allowedCreatingRoles" };
	}

	@Override
	public String[] addProperties() {
		return new String[] { "name", "initialStateDefinition", "allowedCreatingRoles" };
	}

	@Override
	public String[] criteriaProperties() {
		return null;
	}

	@Override
	public String[] listLabels() {
		return null;
	}

	@Override
	public Integer[] listIndexes() {
		return null;
	}

	@Override
	public String[] editLabels() {
		return null;
	}

	@Override
	public Integer[] editIndexes() {
		return null;
	}

	@Override
	public String[] addLabels() {
		return null;
	}

	@Override
	public Integer[] addIndexes() {
		return null;
	}

	@Override
	public String[] criteriaLabels() {
		return null;
	}

	@Override
	public Integer[] criteriaIndexes() {
		return null;
	}

	@Override
	public void permSettings(Map<String, Map<String, Object>> perm_map) {
		super.permSettings(perm_map);
		perm_map.put("post", InnerUtils.mapObject("builder.id", "{{user.id}}"));
	}
}
